<template>
<div>
    <mt-header fixed class="m_mint_header" title="返佣记录">
        <router-link to="/m/friends" slot="left">
            <mt-button icon="back"></mt-button>
        </router-link>
    </mt-header>
    <div class="h50"></div>

    <div class="m_invite_detail_list">
        <template v-for="user in returnRecordData">
            <template v-if="user.inviteLevel == 1">
                <mt-cell :title="user.amount + ' (WE)'" :label="'来自好友 ' + user.invitedName " :value="user.createTime"></mt-cell>
            </template>
            <template v-else-if="user.inviteLevel == 2">
                <mt-cell :title="user.amount + ' (WE)'" :label="'来自好友 ' + user.invitedName +' 的好友' " :value="user.createTime"></mt-cell>
            </template>
        </template>
    </div>
</div>
</template>

<script>
    export default {
        name: "FriendsDetails",
        data(){
            return{
                returnRecordData:[]
            }
        },
        mounted() {
            this.requestGetReturnRecord()
        },
        methods:{
            requestGetReturnRecord(){
                this.requestAxios.requestWeb('post','/api/return_record.do',null,(response)=>{
                    // console.log('return ==',response);
                    this.returnRecordData = response.data;
                })
            },
        }
    }
</script>

<style>
    .m_invite_detail_list{
        margin-top: .3rem;
    }
    .m_invite_detail_list .mint-cell-wrapper{
        align-items: flex-start;
        padding-top: .1rem;
        height: 1.2rem;
        font-size: .3rem;
        border-bottom:1px solid #f2f3f8;
    }
    .m_invite_detail_list .mint-cell-text{
        color:#fa9741;
    }


    .m_invite_detail_list .mint-cell-label{
        margin-top: .2rem;
        color:#333;
        font-weight: bold;
        font-size: .25rem;
    }
</style>
